home *** CD-ROM | disk | FTP | other *** search
/ The 640 MEG Shareware Studio 2 / The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO / prog / pas_all.zip / TI516.ASC < prev    next >
Text File  |  1991-09-11  |  3KB  |  133 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.   PRODUCT  :  TURBO PASCAL                           NUMBER  :  516
  9.   VERSION  :  4.0xx+
  10.        OS  :  MS-DOS
  11.      DATE  :  December 7, 1989                         PAGE  :  1/2
  12.  
  13.     TITLE  :  TURNING THE CURSOR ON AND OFF
  14.  
  15.  
  16.  
  17.  
  18.   The following example routines are  public  domain  programs that
  19.   have been uploaded to  our  Forum on CompuServe. As a courtesy to
  20.   our  users  that  do  not  have immediate access  to  CompuServe,
  21.   Technical Support distributes these routines free of charge.
  22.  
  23.   However, because these routines are public  domain  programs, not
  24.   developed by  Borland International, we are unable to provide any
  25.   technical support or assistance using these routines. If you need
  26.   assistance   using   these   routines,   or    are   experiencing
  27.   difficulties, we  recommend  that  you  log  onto  CompuServe and
  28.   request assistance from the Forum  members  that  developed these
  29.   routines.
  30.  
  31.   To  turn  the  cursor on and off you must use BIOS interrupt $10.
  32.   For more information on  this  interrupt,  please  refer to a DOS
  33.   programmer's guide.   Of course, manipulating the cursor can only
  34.   be done in text mode and not graphics mode.
  35.  
  36.   The  following procedure turns the cursor on  and  off  in  Turbo
  37.   Pascal:
  38.  
  39.           procedure SetCursor(On: Boolean);
  40.           var
  41.             reg : Registers;
  42.           begin
  43.             if On then              { Turn cursor on }
  44.            if Mem[$0040:$0049] = 7 then
  45.                 reg.cx := $B0C  { If monochrome monitor }
  46.            else
  47.              reg.cx := $607  { If color monitor }
  48.             else                    { Turn cursor off }
  49.               reg.cx := $2020;
  50.             reg.bx := 0;
  51.             reg.ax := $0100;    { Set the interrupt function }
  52.             Intr($10,reg);      { Call the interrupt }
  53.           end;  { procedure SetCursor }
  54.  
  55.   This procedure was  revised  from the question and answer section
  56.   in the Turbo Pascal Tutor  and Turbo Pascal version 3.0 reference
  57.   guide.
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.  
  74.   PRODUCT  :  TURBO PASCAL                           NUMBER  :  516
  75.   VERSION  :  4.0xx+
  76.        OS  :  MS-DOS
  77.      DATE  :  December 7, 1989                         PAGE  :  2/2
  78.  
  79.     TITLE  :  TURNING THE CURSOR ON AND OFF
  80.  
  81.  
  82.  
  83.  
  84.   In the procedure you do not need to declare  the  type  Registers
  85.   because it is predefined for you in the DOS unit.   Therefore, to
  86.   use this procedure, your program must also use the DOS unit.
  87.  
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.